package timeseries
Import Path
github.com/K-Phoen/grabana/timeseries (on go.dev)
Dependency Relation
imports 14 packages, and imported by 2 packages
Package-Level Type Names (total 8)
BarAlignment defines how Grafana aligns bars.
func Bars(alignment BarAlignment) Option
const AlignAfter
const AlignBefore
const AlignCenter
GradientType defines the mode of the gradient fill.
func GradientMode(mode GradientType) Option
const Hue
const NoGradient
const Opacity
const Scheme
LegendOption allows to configure a legend.
func Legend(opts ...LegendOption) Option
const AsList
const AsTable
const Avg
const Bottom
const Count
const First
const FirstNonNull
const Hide
const Last
const LastNonNull
const Max
const Min
const Range
const Total
const ToTheRight
LineInterpolationMode defines how Grafana interpolates series lines when drawn as lines.
func Lines(mode LineInterpolationMode) Option
const Linear
const Smooth
const StepAfter
const StepBefore
Option represents an option that can be used to configure a graph panel.
func Alert(name string, opts ...alert.Option) Option
func Axis(options ...axis.Option) Option
func Bars(alignment BarAlignment) Option
func ColorScheme(options ...scheme.Option) Option
func DataSource(source string) Option
func Description(content string) Option
func FieldOverride(m fields.Matcher, opts ...fields.OverrideOption) Option
func FillOpacity(value int) Option
func GradientMode(mode GradientType) Option
func Height(height string) Option
func Legend(opts ...LegendOption) Option
func Lines(mode LineInterpolationMode) Option
func LineWidth(value int) Option
func Links(panelLinks ...links.Link) Option
func Points() Option
func PointSize(value int) Option
func Repeat(repeat string) Option
func RepeatDirection(direction sdk.RepeatDirection) Option
func Span(span float32) Option
func Stack(value StackMode) Option
func Thresholds(options ...threshold.Option) Option
func Tooltip(mode TooltipMode) Option
func Transparent() Option
func WithGraphiteTarget(query string, options ...graphite.Option) Option
func WithInfluxDBTarget(query string, options ...influxdb.Option) Option
func WithLokiTarget(query string, options ...loki.Option) Option
func WithPrometheusTarget(query string, options ...prometheus.Option) Option
func WithStackdriverTarget(target *stackdriver.Stackdriver) Option
func New(title string, options ...Option) (*TimeSeries, error)
func github.com/K-Phoen/grabana/row.WithTimeSeries(title string, options ...Option) row.Option
StackMode configures mode of series stacking.
func Stack(value StackMode) Option
const NormalStack
const PercentStack
const Unstacked
TimeSeries represents a time series panel.
Alert *alert.Alert
Builder *sdk.Panel
func New(title string, options ...Option) (*TimeSeries, error)
TooltipMode configures which series will be displayed in the tooltip.
func Tooltip(mode TooltipMode) Option
const AllSeries
const NoSeries
const SingleSeries
Package-Level Functions (total 29)
Alert creates an alert for this graph.
Axis configures the axis for this time series.
Bars displays the series as bars, with a given alignment strategy.
ColorScheme configures the color scheme.
DataSource sets the data source to be used by the graph.
Description annotates the current visualization with a human-readable description.
FieldOverride allows overriding visualization options.
FillOpacity defines the opacity level of the series. The lower the value, the more transparent.
GradientMode sets the mode of the gradient fill.
Height sets the height of the panel, in pixels. Example: "400px".
Legend defines what should be shown in the legend.
Lines displays the series as lines, with a given interpolation strategy.
LineWidth defines the width of the line for a series (default 1, max 10, 0 is none).
Links adds links to be displayed on this panel.
New creates a new time series panel.
Points displays the series as points.
PointSize adjusts the size of points.
Repeat configures repeating a panel for a variable
RepeatDirection configures repeating vertical or horizontal
Span sets the width of the panel, in grid units. Should be a positive
number between 1 and 12. Example: 6.
Stack defines if the series should be stacked and using which mode (default not stacked).
Thresholds configures the thresholds for this time series.
Tooltip configures the tooltip content.
Transparent makes the background transparent.
WithGraphiteTarget adds a Graphite target to the table.
WithInfluxDBTarget adds an InfluxDB target to the graph.
WithLokiTarget adds a loki query to the graph.
WithPrometheusTarget adds a prometheus query to the graph.
WithStackdriverTarget adds a stackdriver query to the graph.
Package-Level Constants (total 32)
The bar is drawn after the point. The point is placed on the leading corner of the bar.
The bar is drawn before the point. The point is placed on the trailing corner of the bar.
The bar is drawn around the point. The point is placed in the center of the bar.
AllSeries will display all series.
AsList displays the legend as a list.
AsTable displays the legend as a table.
Avg displays the average of the series.
Bottom displays the legend below the graph.
Count displays the number of value in the series.
First displays the first value of the series.
FirstNonNull displays the first non-null value of the series.
Hide keeps the legend from being displayed.
Gradient color is generated based on the hue of the line color.
Last displays the last value of the series.
LastNonNull displays the last non-null value of the series.
Points are joined by straight lines.
Max displays the largest value of the series.
Min displays the smallest value of the series.
No gradient fill.
NormalStack will stack series as absolute numbers
NoSeries will hide the tooltip completely.
Transparency of the gradient is calculated based on the values on the y-axis.
Opacity of the fill is increasing with the values on the Y-axis.
PercentStack will stack series as percents
Range displays the difference between the minimum and maximum values.
In this mode the whole bar will use a color gradient defined by the color scheme.
SingleSeries will only display the hovered series.
Points are joined by curved lines resulting in smooth transitions between points.
Line is displayed as steps between points. Points are rendered at the beginning of the step.
The line is displayed as steps between points. Points are rendered at the end of the step.
Total displays the sum of values in the series.
ToTheRight displays the legend on the right side of the graph.
Unstacked will not stack series
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |